<?php
$a = 0.1 + 0.2;
$b = 0.3;
var_dump($a == $b);
//小数运算精度出错 php属于弱数据类型语言

//替代方案
$a = 1.23456789;
$b = 1.23456780;
$epsilon = 0.00001;

if(abs($a-$b) < $epsilon) {
    echo "true";
}